using B.S.BaseData.Api.Write.Applicantion.Command.HospitalTwoCommand;
using B.S.BaseData.ErrorCode;
using B.S.BataBase.Domain.AI;
using B.S.BataBase.Domain.Hosp;
using MediatR;
using Microsoft.AspNetCore.Mvc;
using static Microsoft.EntityFrameworkCore.DbLoggerCategory.Database;

namespace B.S.BaseData.Api.Write.Controllers
{
    /// <summary>
    /// 医院管理
    /// </summary>
    [ApiController]
    [Route("api/[controller]/[action]")]
    public class SmartCityController : ControllerBase
    {
        private readonly IMediator _mediator;

        public SmartCityController(IMediator mediator)
        {
            _mediator = mediator;
        }
        /// <summary>
        /// 轮播图新增
        /// </summary>
        [HttpPost]
        public async Task<APIResult<int>> CarouselImageAdd(CarouselImageAddCommand command)
        {
            return await _mediator.Send(command);
        }
        /// <summary>
        /// 轮播图删除
        /// </summary>
        [HttpDelete]
        public async Task<APIResult<int>> CarouselImageDelete([FromQuery]CarouselImageDeleteCommand command)
        {
            return await _mediator.Send(command);
        }
        /// <summary>
        /// 轮播图更新
        /// </summary>
        [HttpPut]
        public async Task<APIResult<int>> CarouselImageUpdate(CarouselImageUpdateCommand command)
        {
            return await _mediator.Send(command);
        }
        /// <summary>
        /// 科室新增
        /// </summary>
        [HttpPost]
        public async Task<APIResult<int>> DepartmentAdd(DepartmentAddCommand command)
        {
            return await _mediator.Send(command);
        }
        /// <summary>
        /// 科室更新
        /// </summary>
        [HttpPut]
        public async Task<APIResult<int>> DepartmentUpdate(DepartmentUpdateCommand command)
        {
            return await _mediator.Send(command);
        }
        /// <summary>
        /// 科室删除
        /// </summary>
        [HttpDelete]
        public async Task<APIResult<int>> DepartmentDelete([FromQuery]DepartmentDeleteCommand command)
        {
            return await _mediator.Send(command);
        }
        /// <summary>
        /// 医院更新
        /// </summary>
        [HttpPut]
        public async Task<APIResult<int>> HospitalUpdate(HospitalUpdateCommand command)
        {
            return await _mediator.Send(command);
        }
        /// <summary>
        /// 医院删除
        /// </summary>
        [HttpDelete]
        public async Task<APIResult<int>> HospitalDelete([FromQuery]HospitalDeleteCommand command)
        {
            return await _mediator.Send(command);
        }
        /// <summary>
        /// 医院新增
        /// </summary>
        [HttpPost]
        public async Task<APIResult<int>> HospitalAdd(HospitalAddCommand command)
        {
            return await _mediator.Send(command);
        }
    }
} 